﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using System.Web.Mvc;

namespace Smartec.Accounts.Camel.AMS.Model.Entities
{
    [MetadataType(typeof(SiteUser_Metadata))]
    public partial class SiteUser
    {
       #region DisplayName
        public string DisplayName
        {
            get
            {
                return DisplayName_EN;
            }
        }
        #endregion //DisplayName

        #region Roles
        [Display(Name = "Roles")]
        public string Roles { get; set; }
        #endregion //Roles

        #region Email
        [Display(Name = "Email")]
        public string Email { get; set; }
        #endregion //Email
    }

    public class SiteUser_Metadata
    {
        [Required(ErrorMessage = "Required")]
        [DisplayName("Display Name(EN)")]
        [StringLength(50, ErrorMessage = "Must be under 50 charchters")]
        public string DisplayName_EN { get; set; }

        [DisplayName("Display Name(AR)")]
        [StringLength(50, ErrorMessage = "Must be under 50 charchters")]
        public string DisplayName_AR { get; set; }

        [DisplayName("Date Range")]
        [UIHint("DateRange")]
        [AdditionalMetadata("EndDate", "EndDate")]
        public string StartDate { get; set; }

        [DisplayName("End Date")]
        public string EndDate { get; set; }

        [DisplayName("Active User")]
        public bool IsActive { get; set; }
    }
}
